package monitor;

import java.util.*;

public class Node {
	private int id;
	private int ver;
	private int pressed;
	public int getPressed() {
		return pressed;
	}



	public Node(int id, int ver, int pressed) {
		super();
		this.id = id;
		this.ver = ver;
		this.pressed = pressed;
		this.neibours = new ArrayList<Neibour>();
	}



	public void setPressed(int pressed) {
		this.pressed = pressed;
	}

	private Node parent;
	private int dist;
	
	public int getDist() {
		return dist;
	}



	public void setDist(int dist) {
		this.dist = dist;
	}



	public Node getParent() {
		return parent;
	}
	
	

	public void setParent(Node parent) {
		this.parent = parent;
	}

	public List<Neibour> neibours;
	
	
	public Node(int id, int ver) {
		super();
		this.neibours = new ArrayList<Neibour>();
		this.setId(id); 
		this.setVer(ver);
	}

	public List<Neibour> getNeibours() {
		return neibours;
	}



	public void setNeibours(List<Neibour> neibours) {
		this.neibours = neibours;
	}



	public int getId() {
		return id;
	}

	public void setId(int id) {
		this.id = id;
	}
	
	public void addNeibour(Neibour neibour) {
		neibours.add(neibour);
	}
	
	public void removeNeibour(Neibour neibour) {
		neibours.remove(neibour);
	}
	
	public Neibour getNeibour(int index) {
		return neibours.get(index);
	}

	public int getVer() {
		return ver;
	}

	public void setVer(int ver) {
		this.ver = ver;
	}
	
	public int numNeibours() {
		return neibours.size();
	}

}
